from xbd.publics.public_cc import PublicCc


class test(PublicCc):

    # 重算接口
    def test_rerun(self):
        data = {"baseAccountBookId": 1813492580263063553,
                "subjectIdList": [],
                "accountPeriod": 202409}
        urls = {
            '出纳账重算': '/api/core/v1/finTellerBalance/reCalcTeller',
            '资产账重算': '/api/core/v1/finAssetCardBal/calcAssetBookByMonth',
            '会计账重算': '/api/core/v1/finSubjectBalance/reCalculateSubjectBalance',
            '辅助核算项余额重算': '/api/core/v1/finAssistCalculateBalance/recalculateAssistCalculateBalance'
        }
        for url in list(urls.values()):
            self.post(url, data)

    #修改密码为123456
    def test_modified_pw(self,phone=18020000010,env='test'):
        sql = f"UPDATE t_sys_user set password='6cb773549f232b7900f189d509b6cc805a62c8fd22184b51c055076feac13317' ,salt='olNpwYeoRIjLeAUWjegcnw==' where account={phone}"
        self.run_sql(sql,env=env)

